QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Symbolic Constants

The metafile format for many 3DMF objects includes fields that can take values from a predefined range of constants. In the C programming language, such constants would be defined by means of enumerations or #defines. (For examples, see the QD3D interface files.) In C, this means that a symbolic constant is associated with a particular numerical value. This kind of correlation between symbolic constant and numerical value is also maintained in the metafile, in the following way: the symbolic constant appears in the text metafile, and the corresponding numerical value appears in the binary metafile.

The symbolic constants that appear in text metafiles may include either text characters or digits, but may not include blank spaces or punctuation marks. The logical 'or' symbol ( | ) is used to catenate symbolic constants that function as bitfields.

The corresponding numbers that appear in binary metafiles take the form of unsigned 32-bit integers such as (in hexadecimal) 0x00000001 , 0x0000000E .

3DMF contains two basic symbolic constants, Boolean and Switch . The metafile representation of an enumerated Boolean type is:

Text
Binary
False
0x00000000
True
0x00000001
The metafile representation of an enumerated Switch type is:
 
Text
Binary
Off
0x00000000
On
0x00000001

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |